import java.util.Scanner;

public class code6 {
    public static void printNum(int n){
        int tmp=n%10;
        if(n==0)
            return ;
        else{
            printNum(n/10);
            System.out.print(tmp+" ");
        }
    }

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        while(true){
            int n=sc.nextInt();
            if(n<0){
                System.out.print("- ");
                printNum(-n);
            }
            else
                printNum(n);
            System.out.print('\n');
        }

    }
}
